package com.sias.Loli.service.impl;

import com.sias.Loli.dao.LeaderLogDao;
import com.sias.Loli.entity.LeaderLog;
import com.sias.Loli.service.intf.LeaderLogService;
import com.sias.Loli.util.Rutil;
import com.sias.Loli.vo.PageBean;
import com.sias.Loli.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.rmi.CORBA.Util;
import java.util.List;

@Service
public class LeaderLogServiceImpl implements LeaderLogService {
    @Autowired
    private LeaderLogDao leaderLogrDao;
    /*
    查看个人日志
     */
    @Override
    public PageBean selectLeaderLog(Integer aid) {
        if (aid>0){
            List<LeaderLog> leaderLogs = leaderLogrDao.selectLeaderLog(aid);
            return new PageBean(0,"",leaderLogs.size(),leaderLogs);
        }

        return null;
    }
    /*
    添加日志
     */

    @Override
    public void insertLeaderLog(LeaderLog leaderLog) {
        leaderLogrDao.insertLeaderLog(leaderLog);
    }
}
